package com.zone.module_base.viewExt

import android.widget.RadioGroup
import androidx.databinding.BindingAdapter
import androidx.lifecycle.MutableLiveData

@BindingAdapter("checkedButtonAttrChanged","checkedIndex")
fun setCheckedButtonAttrChanged(radioGroup: RadioGroup, liveData: MutableLiveData<Int>?, index: Int?) {
    liveData?.observeForever { id ->
        id?.let {
            radioGroup.check(it)
        }
    }
    radioGroup.setOnCheckedChangeListener { group, checkedId ->

    }
}